home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / D51_NARexx / Visage_Slideshow.dopus5 < prev    next >
Text File  |  1995-12-26  |  3KB  |  90 lines

  1. /* Visage_Slideshow for Directory Opus 5 and Visage.
  2.  By Leo 'Nudel' Davidson for Gods'Gift Utilities
  3.  email: leo.davidson@keble.oxford.ac.uk  www: http://info.ox.ac.uk/~kebl0364/
  4.  
  5.  Visage is (C)1995 by Magnus Holmgren (Internet: cmh@lls.se or cmh@augs.se,
  6.  Fidonet: 2:204/204.6) and available on Aminet or from Magnus' WWW Page
  7.  (http://www.lls.se/~cmh). Many thanks to Magnus for a great picture viewer,
  8.  especially the rare random-slideshow and xpk-decrypt options.
  9.  
  10. $VER: Visage_Slideshow.dopus5 1.3 (26.12.95)
  11.  
  12.    NOTE: This script _requires_ DOpus v5.11 or above.
  13.  
  14.    This simple script will call "Visage" to display a slideshow of all
  15.    pictures in the source-lister's path, in random order. Optionally, a
  16.    requester will appear so that you can give it a password to xpk-decrypt the
  17.    pictures with, if required.
  18.  
  19.    To change the default amount of time pictures are displayed for, alter the
  20.    "Visage_Delay" variable below (time in seconds).
  21.  
  22. Call as:
  23. ------------------------------------------------------------------------------
  24. ARexx    DOpus5:ARexx/Visage_Slideshow.dopus5 {Qp} {s} [NoPass] [<Time>]
  25. ------------------------------------------------------------------------------
  26. Turn off all switches.
  27. "[]" means this part is optional.
  28. Arguments must be given in the order shown.
  29.  
  30. NoPass: Tells the script not to prompt for a password (no decryption).
  31. <Time>: Override the default delay-time (seconds) between pictures.
  32.  
  33.    v1.00 -> v1.01 - Very minor tidying up.
  34.                     Now checks to make sure the DOPUS.x port exists.
  35.     v1.01 -> v1.2 - Now uses Show() instead of ShowList(). (Thanks Stoebi)
  36.                     Style Guide compliant version numbering and $VER string.
  37.      v1.2 -> v1.3 - "NoPass" option added to surpress password prompt.
  38.                     Added the ability to change the default delay time on
  39.                     the command line.
  40. */
  41. /*- Path to Visage command -------------------------------------------------*/
  42. Visage_Path  = "DH0:Tools/Art/Utils/Visage"
  43. /*- Default Delay variable -------------------------------------------------*/
  44. Visage_Delay = 5
  45. /*--------------------------------------------------------------------------*/
  46. options results
  47. options failat 99
  48. signal on syntax;signal on ioerr        /* Error trapping */
  49. parse arg DOpusPort source_path.0 opt1 opt2 .
  50. DOpusPort = Strip(DOpusPort,"B",'" ')
  51. source_path.0 = Strip(source_path.0,"B",'" ')
  52.  
  53. If DOpusPort="" THEN Do
  54.     Say "Not correctly called from Directory Opus 5!"
  55.     Say "Load this ARexx script into an editor for more info."
  56.     EXIT
  57.     END
  58. If ~Show("P",DOpusPort) Then Do
  59.     Say DOpusPort "is not a valid port."
  60.     EXIT
  61.     End
  62. Address value DOpusPort
  63.  
  64. Delay = Visage_Delay
  65. AskPass = "Y"
  66. If opt1~="" then do
  67.     If upper(opt1)="NOPASS" then do
  68.         AskPass = "N"
  69.         opt1 = opt2
  70.         End
  71.     If Datatype(opt1,"N") then
  72.         Delay = opt1
  73.     End
  74.  
  75. Visage_Password = ""
  76. If AskPass = "Y" then do
  77.     dopus getstring '"Enter password, if required" 256 "" Okay|Cancel'
  78.  
  79.     If DOPUSRC = 0 Then
  80.         Exit
  81.     Else
  82.         If Result ~= "RESULT" Then
  83.             Visage_Password = ' PASSWORD "' || RESULT || '"'
  84.     End
  85.  
  86. address command Visage_Path source_path.0 || "#? DELAY" Delay Visage_Password "NOBUSY FOREVER QUIET RANDOM WAITFORPIC CENTRE"
  87.  
  88. syntax:;ioerr:                /* In case of error, jump here */
  89. EXIT
  90.